Part Number Hot Search : 
MN158418 74VHC164 PEMB4 P11NK40 FM107 PEMB4 CSD2410 T1013DH
Product Description
Full Text Search
 

To Download AVR1511 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AVR1511: qt600-atxmega128a1 training guide features ? knowledge level: intermediate ? pc platform: windows ? 2000, xp, vista ? , win7 ? ? hardware requirements: - atmel qt600 (entire kit) - usb cables ? software requirements: - atmel ? qtouch studio? 4.3.0 or later - atmel qtouch library? 4.3 or later - atmel avr studio ? 4 (latest version) - latest version of winavr ? estimated time to complete all tasks in this guide: 1 day 1 introduction the purpose of this training is to get familiar with the atmel qtouch suite? fo r developing and debugging any atmel touch application. it includes four core solutions: atmel qtouch studio , atmel qt600 development kit , atmel qtouch libra ry , and atmel avr studio . atmel qto uch studio - touch analyzer qtouch studio is the front-end software used to display and evaluate the data reported by the qt600 development kit. atmel qtouch library - touch software library for avr the qtouch library is a software library for developing touch applications on standard atmel avr ? microcontrollers. customers can link the library into their firmware in order to integrate touch- sensing capability into their projects. atmel avr studio - debugger and programmer avr studio is a professional integrated development environment (ide) for writing, simulating, and debugging applications for avr microcontrollers. it also comprises the programming interface for all avr tools. atmel qt600 - touch hardware kit and example code the qt600 is a complete touch development kit for buttons, sliders, and wheels. this advanced development platform allows designers to experiment with atmel touch technology, and provides the easi est way to analyze and validate touch products. it supports both atmel qtouch ? and atmel qmatrix acquisition methods. it comes with one usb-powered interfac e board, three mcu boards representing the atmel tinyavr ? , atmel megaavr ? , and atmel avr xmega ? families of microcontrollers, and three touch sensor boards supporting up to 64 channels. 8-bit microcontrollers application note rev. 8350a-avr-01/11
2 AVR1511 8350a-avr-01/11 the atmel qt600 mcu boards can be connected to the atmel stk600 for easy access to unused i/o pins. stk600, howev er, is not needed for the qt600 kit to function properly. qt600 is fully supported by atmel qtouch studio , atmel qtouch libra ry , and atmel avr studio , and togethe r these tools form the atmel qtouch suite . this hands-on training consists of a number of tasks: 1. connect everything and assure that your hardware is working properly 2. set up a project from scratch, select an d include the library, add the touch files and assembler files 3. create a virtual kit in design mode and use the pin configuration wizard 4. configure the global options and set/enable the sensors 5. add debug files and code to use the debug in terface in order to take advantage of the live debugging features of qtouch studio 6. use the analysis mode and a review brief description of the various parameters 7. use the design validation wizard 8. log data and use it for further analysis and debugging purposes basics for avr studio, winavr, or tools use are not covered. 2 document overview the hands-on training is split into several different assignments. each assignment is further divided into individual sections to simplify understanding. throughout this document you will find some special ic ons. these icons are used to identify different sections of assignments and ease complexity. information delivers contextual informati on about a specific topic. tip highlights useful tips and techniques. to do highlights objectives to be completed. result highlights the expected result of an assignment step. warning indicates important information.
AVR1511 3 8350a-avr-01/11 3 requirements 3.1 software make sure you install the latest versions of: ? atmel qtouch studio 4.3.x ( www.atmel.com/avrqtouchstudio ) ? atmel qtouch library 4.3 ( www.atmel.com/qtouchlib ) o qtouch library user guide o qtouch library selection guide ? atmel avr studio 4 ( www.atmel.com/avrstudio ) o install all matching avr studio serv ice packs in sequential order (sp1, sp2, sp3?..): 1. avr studio 4.18build684 2. avr studio 4.18build692(sp1) 3. avr studio 4.18build700(sp2-latest) ? winavr gcc 3.2 hardware in this hands-on training we are going to use: ? qt600 interface board ? qt600-atxmega128a1-qt16 mcu board ? qtouch16 16-channel touch sensor board 3.3 atmel qt600 system description the qt600 system is based on three boards connected together. ? qt600 interface board ? qt600 mcu board ? touch sensor board figure 3-1. qt600 system.
4 AVR1511 8350a-avr-01/11 the mcu board and touch sensor boards together comprise the user touch system. the qt600 interface board is used to st ream live touch data from the avr mcu mounted on the mcu board. qtouch studio is used as the pc front end to visualize the touch data. 3.3.1 block diagram figure 3-2. block diagram. 3.3.2 pin schematic figure 3-3. pin schematic. portf[0~7] porth[0~7] snsk1[0~7] sns1[0~7] cs portj[8~15] portk[8~15] sns2[8~15] snsk2[8~15] cs r
AVR1511 5 8350a-avr-01/11 4 assignment for the following tasks, please note: ? start with all the cables disconnected (pc to qt600, qt600 to mcu boards?) ? ensure you have installed the latest versions of software listed in section 1 ? from the same web page where you found this application note, download and expand the associated zip file (disk icon). project folders for each task will be relative to where you expanded the zip file {AVR1511}. file paths will be relative to the expanded task folder where each project should be created. the zip includes all touch library files required for these tasks 4.1 task 1: connect the tools and run a test application 4.1.1 introduction this task is designed to make sure all the tools are connected and working as intended. no code writing is needed for this task. you can load the elf file qt600_atxmega128a1_qt16_gnu.elf present at the location: ..\..\exercises\qtouch\tasks\task1\ this can be programmed directly into the fl ash of the mcu. to use the atmel qt600 as a programmer: press the button on the interface board and keep it pressed until the status led changes from orange to red (~5s). this will switch the qt600 from touch debug mode to programmer mode. the touch data led on the qt600 indicates mode: ? touch data led green: touch debug mode (default mode after power-up) ? touch data led off: programmer mode make sure that the touch data led is off before attempting to connect to the qt600 from the avr studio programming dialog. use atmel avr studio 4.18 or later . refer to the qt600 user guide for more details. it can be accessed by launching qtouch studio and then selecting help ? contents ? qtouch studio ? supported kits ? qt600 user guide. 4.1.2 connecting the hardware 1. connect the usb cable to the qt600 interface board 2. make sure the vtg header is mounted on the qt600 3. press the button on the qt600 to switch to programmer mode (~5s) 4. from the connect dialog in avr studio, select qt600 and press connect 5. go to the hardware settings tab and set the target voltage as per the device datasheet. minimum voltage is 1.8v 6. disconnect the usb plug 7. reconnect the usb plug 8. again press the button on the qt600 to switch to programmer mode 9. connect a 10-wire flat cable between the jtag header on the qt600 and the qt600-atxmega128a1-qt16 mcu board
6 AVR1511 8350a-avr-01/11 figure 4-1. jtag connection. 10. program the application code (q t600_atxmega128a1_qt16_gnu.elf). for detailed instructions on how to do this, see the help section in avr studio 11. disconnect the usb plug from the atmel qt600 12. remove the flat cable between the pr ogramming headers, and mount a 10-wire cable between the touch data headers 13. connect the touch panel 14. for atmel atxmega128a1: use the qtouch16 panel figure 4-2. sensor board connections. 15. launch atmel qtouch studio 16. plug the usb cable in to the qt600. qtouch studio should now automatically connect to the kit 17. select analysis mode, and then press the start reading button you should now be able to view the touch data signals and the state of each sensor. refer the figure 4-3 .
AVR1511 7 8350a-avr-01/11 figure 4-3. virtual kit view. in analysis mode, sensors displayed in a light grey color are inactive, and the kit will not respond to touches to these sensors. sensors displayed in a light brown color are active sensors, and the kit will respond to touches to these sensors. whenever a touch to an active sensor is detected, a green filled circle can be seen indicating where the user touches the sensor. when a touch to the active sensor is no longer detected, the color of the sensor will go back to light brown again. figure 4-4. sensor states.
8 AVR1511 8350a-avr-01/11 4.2 task 2: set up a new project, select and incl ude librar y, add touch files and assembler files 4.2.1 introduction in this task, we will create a new projec t. we will add the necessary libraries, touch files and assembler files. 4.2.2 setting up the code create a new project 1. open avr studio and create a new proj ect. (if avr studio is already running, then use project ? new project) 2. select project type avr gcc, set proj ect name to task2, uncheck create initial file, uncheck create folder, set location, and then click finish figure 4-5. new project. set the mcu type 1. select project ? configuration options ? general and set device to atxmega128a1, as shown in figure 4-6
AVR1511 9 8350a-avr-01/11 figure 4-6. selecting the device. add the main.c file 1. right click on source files and add the ex isting main.c source file to the project figure 4-7. including the main.c. test compile to ensure all tools are installed ok 1. select build ? rebuild all, and ensure that the bu ild completes successfully with no errors or warnings select the library file 1. open the library_selection_guide.xls file in the task2 folder and click on the qtouch tab (we are using atmel qtouch). similarly, for atmel qmatrix, click on the tab for qmatrix 2. select the technology as qtouch, mcu family as atmel xmega, mcu type as 8 bit, mcu as atmel atxmega128a1, the tool chain as gcc, ports available for qtouch as a,b,c,d,e,f, maximum number of channels as 16, maximum number of rotors or sliders as 2 and. as you can see, it shows the appropriate library file to be included and example project to be used 3. note: because we are building a new proj ect, note down which library file is to be included
10 AVR1511 8350a-avr-01/11 here, the library file to be included is libavrxmega7g1-16qt-k-4rs.a. include the library file 1. open the configuration tab and click on libraries 2. click on the folder icon at the top right corner. refer figure 4-8 figure 4-8. inclu ding the library file. 3. enter the appropriate path and include this library 4. the library file can be found at ..\..\library_files\ 5. now select libavrxmega7g1-16qt-k-4rs.a and click on add library, as in figure 4-9
AVR1511 11 8350a-avr-01/11 figure 4-9. library file included. include touch header files 1. to use the touch keys, first we need to add #include ?touch_api.h? to our list of include files. this will make the atmel qtouch library api available 2. add it under the following comment in the main.c file: /* now include touch api.h with the localization defined above */ 3. open project options, click on include directories, and enter the path where the touch.api file is found 4. this file is found in the include folder under exercises 5. similarly, click on include directorie s and add the path for the touch_qt_config.h file. this file is found in the common_files folder 6. the touch_qt_config.h file is where a ll the technology options are configured
12 AVR1511 8350a-avr-01/11 enter the relative path, as shown in the figure 4-10 (similar to ho w you added the library). figure 4-10. included directories. custom options open project options and click on custom options. add -d_qtouch_, as shown in figure 4-11
AVR1511 13 8350a-avr-01/11 figure 4-11. custom compilation options. this tells the library that we are going to use atmel qtouch measurement technology (as opposed to atmel qmatrix). add the assembler file 1. add the source file, qt_asm_xmega.s 2. the qt_asm_xmega.s file can be f ound in the common_files folder under the qtouch folder. qt_asm_xmega.s is a special assembly source file that contains optimization routines that need to be compiled with our project 3. in the avr gcc tab in atmel avr studio, right click on the project, select add existing file, and then select the assembly s ource file. alternatively, you can drag and drop the source file onto the project name now save and build the project, and if all the steps mentioned above have been followed, you should be able to build successfully with no errors.
14 AVR1511 8350a-avr-01/11 4.3 task 3: create a virtual kit in design mode and use the pin configuration w izard create a virtual kit 1. launch atmel qtouch studio. select design mode 2. design mode shall provide editable virt ual kit. it allows users to add buttons, wheels, sliders, and kit background image and select kit technology (qtouch or qmatrix) 3. check the auto-assign channels option figure 4-12. design mode. 4. on the file menu, click new design. in the create new design window, specify the project id, project name, kit canvas properties like height and width (millimeters) and background (kit) image, and kit technology, along with a valid number of sensors for the new project 5. for this hands-on training, select qtouch as the kit technology. under sensors, select the number of buttons as 10, wheels as 1, and sliders as 1 6. for the background image, select the image provided in the task3 folder named f002-qt600-panel-qt16-image 7. assign channel numbers 0-9 to bu ttons 0-9, respectively. assign channel numbers 10-12 to the slider, and channels 13-15 to the wheel figure 4-13. new design. note down the project id 8. click on each sensor and adjust the hei ght and width accordingly in the kit/sensor configuration window. refer to figure 4-14
AVR1511 15 8350a-avr-01/11 figure 4-14. design mode. 9. save the design in the same folder 10. notice that the wheel has been assigned to channels 10-12 and the slider to 13- 15 11. delete the wheel by right clicking on the wheel and selecting the delete sensor option. in a similar manner, delete the slider 12. notice the toolbar on the top left corner of the virtual kit window 13. click on the slider icon and a slider gets added to the virtual kit. similarly, click on the wheel icon to add a wheel to the virtual kit. refer to figure 4-15 figure 4-15. adding a sli der and wheel.
16 AVR1511 8350a-avr-01/11 14. ensure that the channel numbers are assigned as follows: slider: 10-12 wheel: 13-15 15. now adjust the height and width of both the wheel and slider 16. save the design (file ? save design) and close it make a note of the project id make sure that the slider has been assigned channels 10-12 and the wheel channels 13-15. using the pin configuration wizard 1. now reopen the same design 2. open the tools menu, and clic k on pin configuration wizard figure 4-16. selecting pin configuration wizard. 3. the pin configuration wizard window opens figure 4-17. pin configuration wizard.
AVR1511 17 8350a-avr-01/11 4. click on next. select the mcu family as atmel xmega and the mcu as atmel atxmega128a1. select the sns and snsk ports for pair1 as f and h (button 0 ? button 7). select the sns and snsk ports for pair2 as j and k (button 8 ? button 9, slider 0, wheel 0). click on next 5. select pins for the sensors. in this case, you can use auto assign 6. click on next and the summary page opens 7. click on next again. co py the code onto a notepad 8. add the following piece of code in the main.c file under the label /* declare the sns_array[][] and the snsk_array[][] here ------------*/ #ifdef qtouch_studio_masks extern touch_data_t sns_array[2][2]; extern to uch_data_t snsk_array[2][2]; #endif this is to hold the burst masks generated 9. copy this part of the code in the ma in.c file in the main function under the comment /* the code generated by pin configuration wizard */ #ifdef qtouch_studio_masks sns_array[0][0]= 0x55; sns_array[0][1]= 0xaa; sns_array[1][0]= 0x1d; sns_array[1][1]= 0xe2; snsk_array[0][0]= 0x55; snsk_array[0][1]= 0xaa; snsk_array[1][0]= 0x1d; snsk_array[1][1]= 0xe2; #endif compile options 1. open project options and click on custom options 2. to use the pin configurability, enable the macro qtouch_studio_masks in the project options 3. add these options one at a time (refer to figure 4-18 ) -dqtouch_studio_ma sks -dqt_num_channels=16 -d_rotor_slider_ -dsns1=h -dsnsk1=f -dsns2=k -dsnsk2=j -dqt_delay_cycles=1
18 AVR1511 8350a-avr-01/11 figure 4-18. custom compile options. this tells the library which ports the m easurements are done on, that a rotor and slider are defined, and that the maximum number of channels is 16. ?dqt_delay_cycles=1 tells the library there will only be one delay cycle. the exact meanings of some of these parameters are not too important right now, but if you want further information, please refer to qtouch librar y user guide . these settings need to be entered into any project using the qtouch library . if not enabled in the project options, you can define the above macros in the touch_qt_config.h file. now build the project, and if everything has been done as per the guidelines given, you should be able to build successfully with no errors.
AVR1511 19 8350a-avr-01/11 4.4 task 4: configure the global options and enable/set the sensors 4.4.1 setting up the code initialize the library after this initial configurati on, we need to initialize the qtouch library . this i s done by simply calling qt_init_sensing(); add a call to this function under the label: /* initialise and set touch parameters */ after this, add qt_s et_parameters(); adding more qtouch library configuration next, we need to set up some runtime gl obal qtouch parameters. we have provided a function, qt_set_parameters();, in which this should be done. find this function and add the following code to it: qt_config_data.qt_di = def_qt_di; qt_config_data.qt_neg_drift_rate = def_qt_neg_drift_rate; qt_config_data.qt_pos_drift_rate = def_qt_pos_drift_rate; qt_config_data.qt_max_on_duratio n = def_qt_max_on_duration; qt_config_data.qt_drift_hold_tim e = def_qt_drift_hold_time; qt_config_data.qt_recal_thresho ld = def_qt_recal_threshold; qt_config_data.qt_pos_recal_delay = def_qt_pos_recal_delay; exactly what these parameters specify isn?t im portant right now; we will go into further detail later. a tip here would of course be to copy paste the code from the block above into your project. adding the timer isr call init_timer_isr(); to configure the timer isr to fire regularly. add this before the label /*pin configuration code as generated by pin configuration wizard */ find this function and add the following code to it: /* set timer period */ tcc0.per = ticks_per_ms * qt_measurement_period_msec; /* select clock source */ tcc0.ctrla = (touch_data_t)4; /* set compare a interrupt to low level */ tcc0.intctrlb = 1u; /* enable low lever interrupts in pow er manager interrupt control */ pmic.ctrl |= 1u; find the function isr(tcc0_cca_vect), and add the following code to it: /* set flag: it's time to measure touch */ time_to_measure_touch = 1u; /* update the current time */ current_time_ms_touch += qt_measurement_period_msec; now it?s time to configure our first button 1. we use the following api call to configure a button: qt_enable_key( channe l_0, aks_group_1, 10u, hyst_6_25 );
20 AVR1511 8350a-avr-01/11 this tells atmel qtouch that channel 0 should be treated as a key. we will look at the last three parameters a little later. 2. add the following piece of code after the init_system( ); call, after the label /* config sensors */: qt_enable_key(channel_0, no_aks_group, 10u, hyst_6_25); similarly, configure the other keys. 3. to enable a slider using channels 10, 11, and 12, add the following line: qt_enable_slider (chann el_10, channel_12, no_aks_group, 10u, hyst_6_25, res_8_bit, 0u); note: the res_8_bit argument is the slider resolution. 4. similarly, enable the rotor using chann els 13, 14, and 15 by adding the following line: qt_enable_rotor(chan nel_13, channel_15, no_aks_group, 10u, hyst_50, res_8_bit, 0u); the other arguments are not too important right now. somewhere to store time we are now almost ready to start taking measurements. a single measurement is taken by calling qt_measure_sensors (uint 16_t current_time_ms), but as you can see, it expects an argument. this argument is used to keep track of time to allow compensating for over-time drifting in the measured values. if you are not concerned with drifting, you can pass this argument as zero. for our application, we are using current_time_ms_touch as a simple counter to keep track of time filter functions this function is called after the library has made capacitive measurements, but before it has processed them. the user can use this hook to apply filter functions to the measured signal values (possibly to fix sensor layout faults). add this code line, qt_filter_callback = 0; in the main function after the label /* filter callback function */. we are now ready to perform a touch measurement call enable_interrupt(); just before the for loop beings to enable interrupts. inside the main loop, under /* loop forever */, add the following piece of code below the label /* measure touch once */, status_flag = qt_measure_sen sors(current_time_ms_touch); burst_flag = status_flag & qtlib_burst_again; build the code it should build successfully with no errors or warnings.
AVR1511 21 8350a-avr-01/11 4.4.2 further explanation most of the function calls used in this task are quite simple and self explainatory. the most complex line is the qt_enable_key() function, so let?s look closer at this: void qt_enable_key(channel_t channel, aks_group_t aks_group, threshold_t detect_threshold, hysteresis_t detec t_hysteresis); the parameters are as follows: channel = which touch channel the key sensor uses aks_group = which aks group (if any) the sensor is in detect_threshold = the sensor detection threshold detect_hysteresis = the sensor detection hysteresis value the slider and wheel declarations have similar parameters: void qt_enable_slider( channel_t from_channel, channel_t to_channel, aks_group_t aks_group, threshold_t detect_threshold, hysteresis_t detect_hysteresis, resolution_t position_resolution, uint8_t position_hysteresis); void qt_enable_rotor( channel_t from_channel, channel_t to_channel, aks_group_t aks_group, threshold_t detect_threshold, hysteresis_t detect_hysteresis, resolution_t angle_resolution, uint8_t angle_hysteresis); the slider and wheel declarations have a few more parameters: from_channel - the first channel in the rotor sensor to_channel - the last channel in the rotor sensor aks_group - which aks group (if any) the sensor is in detect_threshold - the sensor detection threshold detect_hysteresis - the sensor detection hysteresis value position_resolution - the resolution of the reported position value angle_resolution - the resolution of the reported angle value position_hysteresis - t he hysteresis of the reported position value angle_hysteresis - the hysteres is of the reported angle value
22 AVR1511 8350a-avr-01/11 4.5 task 5: use the debug interface 4.5.1 introduction the debug interface is used to communicate various touch sensor information to the computer running qtouch studio. the debug interface as seen from the xmega is implemented completely in firmware. this is to be added only for debugging purposes. here, bit bang spi protocol has been implemented to transfer touch data. 4.5.2 setting up the code add the source files ? qdebug.c ? qdebugtransport.c ? eepromaccess.c ? bitbangspi_master.c 1. qdebug.c, qdebugtransport.c, and eeprom_access.c can be found in the debug folder. bitbangspi_master.c can be found in the task5 folder 2. the debug interface is used to communicate various touch sensor information to a computer running atmel qtouch studio 3. in the avr gcc tab in avr studio, righ t click the project and select add existing file, and then select the bitbangspi_master. c source file. alternatively, you can drag and drop the source file onto the project name 4. the atmel qt600 interface board and qtouch studio can be used to read touch data from any application based on the qtouch library . here we are using bit banged spi as the communication interface 5. open the project options window, click on include directories, and specify the right paths for all four files (enter the relative path) add the include files include the following header files in the main.c file below the label /* now include the debug f iles----------- ---------*/: #include "qdebug.h" #include "qdebugtransport.h" custom options open the project options window, switch to the custom options tab, and add the following flag: -d_debug_interface_ adding code 1. in the qdebugsettings.h file, add the project id (same project id given to the virtual kit image in task 3) under the label /* define custom project as the project id of the virtual kit */ 2. under the label // set up project info, assign the project id #define project_id custom_project
AVR1511 23 8350a-avr-01/11 3. define the communications protocol. in this hands-on training, we are using the bit-bang spi protocol. #define qdebug_spi_bb 4. in the bitbangspi_master.h file, verify that the bit-bang spi pins, port, and clock frequency are defined correctly 5. add this piece of code under the label /* initialize debug protocol */ #ifdef _debug_interface_ qdebug_init(); #endif 6. add this piece of code under the label /* send debug data */ #ifdef _debug_interface_ qdebug_senddata(status_flag); #endif 7. add this piece of code under the label /* process commands from pc */ #ifdef _debug_interface_ qdebug_processcommands(); #endif qdebug_processcommands(); is called twice in the code. build the code 1. it should build successfully with no errors or warnings 2. now connect the kit as shown in task 1 3. program the code 4. launch atmel qtouch studio and switch to analysis mode 5. check if your kit gets connected 6. switch to analysis mode an d click on the start reading button 7. test whether you are able to detect to uch and see it on qtouch studio or not. in the data view you can see the values of reference, signal, and delta and the state of each sensor
24 AVR1511 8350a-avr-01/11 4.6 task 6: analysis mode 4.6.1 introduction analysis mode has a scalable image of the connected kit. it will show touch events such as button presses, wheel use, and slider use. the toolbar buttons in the virtual kit view window shall be used to perform zoom-in, zoom-out, auto- fit and auto code generation operations. the analysis mode can be selected by us ing the radio buttons in the control view. atmel qtouch studio reads out the channel to sensor mapping for an avr qtouch kit when it is connected to the pc. using this information, the image of the kit will be updated. as explained during task 1, sensors draw n in a light grey color are inactive, and sensors drawn in a light brown color are active sensors. whenever a touch to an active sensor is detected, a filled circle indicating where the user touches the sensor is drawn. the filled circle increases when the delta increases, and changes color when the threshold is reached. when a touch to the active sensor is no longer detected, the color of the sensor will go back to light brown again. the user shall be able to edit sensor configuration options (non-design options) and kit configuration options (non- design options) in analysis mode. 4.6.2 configuring the kit/sensors adjacent key suppression (aks) 1. open the kit/sensor configuration windo w, select button 0, and configure the aks group as aks_group_1 2. similarly, configure button 5 and button 9 as aks_group_1 3. now, if you touch all three buttons at the same time, only one is detected
AVR1511 25 8350a-avr-01/11 figure 4-19. modifying kit/sensor configuration. in designs where the sensors are close together or set for high sensitivity, multiple sensors might report detect si multaneously if touch is near them. to allow applications to determine the intended single touch, the touch library provides the user the ability to configur e a certain number of sensors in an aks group. when a group of sensors are in the sa me aks group, only the first, strongest sensor will report detection. the sensor reporting detection will continue to report detection even if another sensor?s delta becomes stronger. the sensor stays in detect until its delta falls below its detection threshold, and then, if any more sensors in the aks group are still in detect, the strongest will report detection. and so at any given time, only one sensor from each aks group will be reported to be in detect. modify all global and sensor parameters runtime as shown in figure 4-19 detect threshold 1. open the kit/sensor configuration windo w, select any sensor, and change the value of the detect threshold. click on write to kit 2. observe how sensitivity of that se nsor changes with different values 3. the lower the value, the more sensitive is the sensor
26 AVR1511 8350a-avr-01/11 a sensor?s detect threshold defines ho w much its signal must drop below its reference level to qualify as a potential touch detect. it has a range of between 3 and 255. for more details on all the configuration parameters, please refer to the qtouch library user guide . maximum on duration 1. click on the view menu and click on graph view. the qtouch graph view window opens 2. select data set for channel 0 and observe what happens on touch figure 4-20. maximum on duration = 0. 3. if a touch happens for a prolonged duration when the maximum on duration is zero, the sensor remains in detect 4. open the kit/sensor configuration window 5. change the maximum on duration to 30, and the sensor automatically recalibrates after six seconds figure 4-21. maximum on duration = 30. if an object unintentionally contacts a se nsor and results in a touch detection for a prolonged interval, it is usually desirable to recalibrate the sensor in order to restore its function, perhaps after a time delay of some seconds. the maximum on duration timer monitors such detections.
AVR1511 27 8350a-avr-01/11 4.7 task 7: design validation 4.7.1 introduction the design validation wizard is a tool us ed to validate the design by measuring and logging values received from the kit. 4.7.2 using the design validation wizard 1. connect the kit and start a touch debug session 2. launch atmel qtouch studio and start the design validation wizard from the tools menu figure 4-22. selecting design validation wizard. 3. the design validation wizard opens figure 4-23. design validation wizard. 4. on the first page, it will ask you to click the measure button without touching any of the sensors. follow the instructions 5. click next and follow subsequent instructions 6. at the end, you will get a summary with details about each sensor and recommended settings 7. you can either write these recommended settings to the kit or project file 8. save the design and project file and reopen them again to see if the changes have been made
28 AVR1511 8350a-avr-01/11 4.8 task 8: log and analyze data logging the data 1. if the auto-start reading option is checked, then atmel qtouch studio will automatically start reading touch data when a kit is connected 2. if unchecked, you must click the start reading button to make qtouch studio start reading touch data. checking the log data to file checkbox will make qtouch studio log data read from the kit 3. as soon as reading has stopped, either because the user has clicked on the stop reading button or the kit has been disconnected from the pc, a dialog will pop up to let the user specify a location and file name to save the logged data 4. note that clicking the cancel button w ill simply discard all data logged and close the dialog analysis and debugging 1. open a new excel spreadsheet and import data from the logged data 2. select tab and semicolon as delimiters and save the file figure 4-24. importing data. 3. you can also create charts, which help in analyzing the logged data and observing variations. in the excel spreadsheet named formatted_log_chart, you can observe the delta variations for channel 4 in the form of a chart as depicted
AVR1511 29 8350a-avr-01/11 5 summary the main goal with this hands-on training was to learn how to set up and use the atmel qtouch suite and the atmel qt 600 kit: ? set up the hardware ? create a project from scratch and include libraries and other header files ? create a virtual kit, use the pin config uration wizard, and configure technology options ? configure global options and enable sensors ? add buttons, sliders, and wheels ? use analysis mode ? use the design validation wizard ? log and analyze data in addition, you have learned how to use the atmel qtouch studio gui, to write c code, debug your code, and program the device. note all the include files and other source files in this hands-on training have been taken from atmel qtouch library version 4.3 . i f a new library version is released, please use the latest files from it. 6 atmel technical support center atmel has several support channels available: ? web portal: http://support.atmel.no/ all atmel microcontrollers ? email: touch@atmel.com all touch products ? email: avr@atmel.com all avr products ? email: avr32@atmel.com all avr32 products please register on the web portal to gai n access to the following services: ? a rich faq database ? easy submission of technical support requests ? a history of all your past support requests ? atmel microcontrollers? newsletters ? information about available trainings and training material
30 AVR1511 8350a-avr-01/11 7 table of contents features ............................................................................................... 1 1 introduction ...................................................................................... 1 2 document overvi ew ......................................................................... 2 3 require ments ................................................................................... 3 3.1 softw are .............................................................................................................. 3 3.2 hard ware ............................................................................................................. 3 3.3 atmel qt600 syst em description ........................................................................ 3 3.3.1 block diagram............................................................................................................ 4 3.3.2 pin schematic ............................................................................................................ 4 4 assignm ent ...................................................................................... 5 4.1 task 1: connect the tool s and run a test application .......................................... 5 4.1.1 introducti on............................................................................................................. ... 5 4.1.2 connecting the hardware .......................................................................................... 5 4.2 task 2: set up a new project, select and include library, add touch files and assembler files........................................................................................................... 8 4.2.1 introducti on............................................................................................................. ... 8 4.2.2 setting up the code ................................................................................................... 8 4.3 task 3: create a virtual kit in desi gn mode and use the pin configuration wizard ................................................................................................................................. 14 4.4 task 4: configure the global options and enable/se t the sensors .................... 19 4.4.1 setting up the code ................................................................................................. 19 4.4.2 further explanation ................................................................................................. 21 4.5 task 5: use t he debug inte rface ....................................................................... 22 4.5.1 introducti on............................................................................................................. . 22 4.5.2 setting up the code ................................................................................................. 22 4.6 task 6: analysis mode ...................................................................................... 24 4.6.1 introducti on............................................................................................................. . 24 4.6.2 configuring the ki t/sensors ...................................................................................... 24 4.7 task 7: desi gn validation .................................................................................. 27 4.7.1 introducti on............................................................................................................. . 27 4.7.2 using the desig n validati on wizard .......................................................................... 27 4.8 task 8: log and analyz e data ........................................................................... 28 5 summary......................................................................................... 29 6 atmel technical support center .................................................... 29 7 table of contents ........................................................................... 30
8350a-avr-01/11 atmel corporation 2325 orchard parkway san jose, ca 95131 usa tel: (+1)(408) 441-0311 fax: (+1)(408) 487-2600 www.atmel.com atmel asia limi ted unit 01-5 & 16, 19f bea tower, milennium city 5 418 kwun tong road kwun tong, kowloon hong kong tel: (+852) 2245-6100 fax: (+852) 2722-1369 atmel munich gmbh business campus parkring 4 d-85748 garching b. munich germany tel: (+49) 89-31970-0 fax: (+49) 89-3194621 atmel japan 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chou-ku, tokyo 104-0033 japan tel: (+81) 3523-3551 fax: (+81) 3523-7581 ? 2010 atmel corporation. all rights reserved . / rev.: corp072610 atmel ? , atmel logo and combinations thereof, avr ? , xmega ? , avr studio ? , qtouch ? , tinyavr ? , megaavr ? and others are registered trademarks of atmel corporati on or its subsidiaries. windows ? and others are registered trademarks of microsoft corporation in u.s. and or other countries. other terms and product names may be trademarks of others. disclaimer: the information in this document is provi ded in connection with atmel products. no li cense, express or im plied, by estoppel or otherwise, to any intellectual property right is granted by this docum ent or in connection with the sale of atmel products. except as set forth in the atmel terms and conditions of sales located on the atmel webs ite, atmel assumes no liability whatsoever and disclaims any express, implied or statutory warranty relating to its products i ncluding, but not limi ted to, the implied warranty of merchantability, fitness for a particular purp ose, or non-infringement. in no event shall atmel be liable for any direct, indirect, consequential, punitive, special or incide ntal damages (including, without limitation, damages for loss and profits, business interruption, or loss of information) arising out of the use or inability to use this document, even if at mel has been advised of the possibility of such damages. atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and rese rves the right to make changes to specifications and product descriptions at any time without notice. atmel does not ma ke any commitment to update the information contained herein. unless specifically provided otherwise, atmel products are not suitable for, and s hall not be used in, automotive applications. atmel products are not intended, authorized, or warranted for use as components in applicat ions intended to support or sustain life.


▲Up To Search▲   

 
Price & Availability of AVR1511

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X